package com.jxaummd.mushroom.main.common.data;


import com.jxaummd.mushroom.core.app.application.University;
import com.jxaummd.mushroom.core.base.data.CommonBackModel;
import com.jxaummd.mushroom.core.base.data.DataSource;
import com.jxaummd.mushroom.core.util.net.RestClient;

public class RegisterData {
    /**
     * 发送
     * 验证码
     */
    public static void register(String phoneNumber, String password, String code, DataSource.Callback callback) {
//        RestClient.builder()
//                .url(University.getApiHost() + "/University/registers")
//                .params("phoneNumber", phoneNumber)
//                .params("code", code)
//                .params("password", password)
//                .success(response -> {
//                    CommonBackModel commonBackModel = CommonBackModel.parseInstance(response);
//                    callback.onDataLoaded(commonBackModel);
//                })
//                .error((code1, msg) -> {
//                    CommonBackModel commonBackModel = CommonBackModel.parseInstance(msg);
//                    callback.onDataLoaded(commonBackModel);
//                })
//                .build()
//                .get();
    }

    /**
     *
     * 找回密码
     */
    public static void forgetPassword(String phoneNumber, String password, String code, DataSource.Callback callback) {
//        RestClient.builder()
//                .url(University.getApiHost() + "University/resetPassword")
//                .params("phoneNumber", phoneNumber)
//                .params("code", code)
//                .params("password", password)
//                .success(response -> {
//                    CommonBackModel commonBackModel = CommonBackModel.parseInstance(response);
//                    callback.onDataLoaded(commonBackModel);
//                })
//                .error((code1, msg) -> {
//                    CommonBackModel commonBackModel = CommonBackModel.parseInstance(msg);
//                    callback.onDataLoaded(commonBackModel);
//                })
//                .build()
//                .get();
    }
}
